package com.giggle.restclient.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author guozichen
 * @ClassName:
 * @Description: ()
 * @date 2020/11/12 20:10
 */
@ConfigurationProperties(
        prefix = "giggle.httpclient.registryvo"
)
public class HttpClientConfig {
    @Value("${maxTotal:50}")
    private int maxTotal;
    @Value("${maxPerRoute:100}")
    private int maxPerRoute;
    @Value("${readTimeout:30000}")
    private Integer readTimeout;
    @Value("${connectTimeout:8000}")
    private Integer connectTimeout;
    @Value("${conReqTimeOut:5000}")
    private Integer conReqTimeOut;

    public HttpClientConfig() {
    }

    public int getMaxTotal() {
        return this.maxTotal;
    }

    public void setMaxTotal(int maxTotal) {
        this.maxTotal = maxTotal;
    }

    public int getMaxPerRoute() {
        return this.maxPerRoute;
    }

    public void setMaxPerRoute(int maxPerRoute) {
        this.maxPerRoute = maxPerRoute;
    }

    public Integer getReadTimeout() {
        return this.readTimeout;
    }

    public void setReadTimeout(Integer readTimeout) {
        this.readTimeout = readTimeout;
    }

    public Integer getConnectTimeout() {
        return this.connectTimeout;
    }

    public void setConnectTimeout(Integer connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public Integer getConReqTimeOut() {
        return this.conReqTimeOut;
    }

    public void setConReqTimeOut(Integer conReqTimeOut) {
        this.conReqTimeOut = conReqTimeOut;
    }
}

